package com.example.yuejian.yuejian.bean;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/9/27.
 */

public class MyPrize {

    /**
     * id : 3
     * prizename : 亲吻
     * intro : 就斤斤计较斤斤计较
     * Integral : 2
     * photo : http://10.0.2.2/laravel54/public/Uploads/
     * users_id : 2
     */

    private int id;
    private String prizename;
    private String intro;
    private String Integral;
    private String photo;
    private int users_id;

    public static MyPrize objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), MyPrize.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setPrizename(String prizename) {
        this.prizename = prizename;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public void setIntegral(String Integral) {
        this.Integral = Integral;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public void setUsers_id(int users_id) {
        this.users_id = users_id;
    }

    public int getId() {
        return id;
    }

    public String getPrizename() {
        return prizename;
    }

    public String getIntro() {
        return intro;
    }

    public String getIntegral() {
        return Integral;
    }

    public String getPhoto() {
        return photo;
    }

    public int getUsers_id() {
        return users_id;
    }
}
